#ifndef CONTROAL_H
#define CONTROAL_H

#include <QObject>
#include "NUC_communication.h"

#include "QSerialPortInfo"
#include "QSerialPort"
#include <QApplication>

#include <QDebug>
#include "stdint.h"
#include "stdlib.h"
#include "string.h"

/***
 *将发送数据抽象为控制类
 ***/
class controal : public QObject
{
    Q_OBJECT
public:
    explicit controal(QObject *parent = nullptr);


    void get_Massage();
    void Set_Pitch_And_Yaw(float pitch,float yaw);//转头
    void shout(int num);//射多少发子弹
    void shout_Close();//关闭射击孔
    void shout_Open();//打开射击孔
private:
    void Send(NUC_data_t &toStm32);
    NUC_data_t toSTM32;
    STM32_data_t formSTM32;
    QSerialPort port;
public slots:
     void onReadyRead();
signals:

};

#endif // CONTROAL_H
